﻿<phone:PhoneApplicationPage x:Class="USElections.Pages.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            xmlns:nlcontrols="clr-namespace:NorthernLights.Controls;assembly=NorthernLights.Controls"
                            xmlns:maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
                            xmlns:tiles="clr-namespace:USElections.Tiles"
                            mc:Ignorable="d"
                            d:DesignWidth="480"
                            d:DesignHeight="696"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            shell:SystemTray.IsVisible="True"
                            shell:SystemTray.Opacity="0"
                            Style="{StaticResource TransitionPageStyle}">
	<phone:PhoneApplicationPage.Resources>
		<DataTemplate x:Key="HeaderDataTemplate">
			<Grid/>
		</DataTemplate>
	</phone:PhoneApplicationPage.Resources>


    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="80" />
        </Grid.RowDefinitions>
        <controls:Panorama Grid.Row="0"
                           Title="us elections"
                           SelectionChanged="PanoramaSelectionChanged">
            <controls:Panorama.Background>
                <ImageBrush Opacity="0.35"
                            AlignmentY="Top"
                            Stretch="None">
                    <ImageBrush.ImageSource>
                        <BitmapImage UriSource="/Images/whitehouse.jpg"
                                     CreateOptions="BackgroundCreation" />
                    </ImageBrush.ImageSource>
                </ImageBrush>
            </controls:Panorama.Background>

            <controls:PanoramaItem Header="main">
                <ScrollViewer>
                    <Grid>
                        <toolkit:WrapPanel x:Name="tilesManager"
                                           Grid.Row="0"
                                           ItemHeight="185"
                                           ItemWidth="185">

                        </toolkit:WrapPanel>
                    </Grid>
                </ScrollViewer>
            </controls:PanoramaItem>

            <controls:PanoramaItem Header="candidates"
                                   toolkit:TiltEffect.IsTiltEnabled="True">
                <ListBox x:Name="candidatesListBox"
                         Margin="0,0,-12,0"
                         ItemTemplate="{StaticResource candidatesItemTemplate}"
                         ItemsSource="{Binding}">
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <toolkit:WrapPanel ItemHeight="185"
                                               ItemWidth="185"
                                               MaxWidth="380"
                                               Orientation="Horizontal"
                                               HorizontalAlignment="Left"
                                               Margin="6" />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                </ListBox>
            </controls:PanoramaItem>
        </controls:Panorama>

        <nlcontrols:Notification x:Name="notification" />
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True"
                              IsMenuEnabled="true"
                              Mode="Minimized"
                              Opacity="1">
            <shell:ApplicationBarIconButton IconUri="/Icons/appbar.feature.settings.rest.png"
                                            Text="settings"
                                            Click="ApplicationBarIconButtonClick" />
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="about"
                                              Click="ApplicationBarMenuItemClick" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>